const info = require("./information");
const generate = require("./generate");
const creepobjs = info.creepobjs;
const roomname = info.roomname;

module.exports = function () {
    generate();
    for (let i in Game.creeps) {
        let creep = Game.creeps[i];
        if ((creep.room.name == roomname && !/^g_/.test(i)) ||
            (/^g_/.test(i) && creep.memory.roomname == roomname)) {
            // if (creepobjs[creep.memory.role])
            creepobjs[creep.memory.role](creep);
        }
    }
};